#include "toolbar.h"

ToolBar::ToolBar(QWidget *parent) :
	QWidget(parent),
	actionBack(new QAction(this)),
	actionForward(new QAction(this)),
	actionReload(new QAction(this)),
	actionConfigure(new QAction(this)),
	toolBar(new QToolBar(this)),
	lineUrl(new QLineEdit(this))
{
	actionBack->setObjectName(QString::fromUtf8("actionBack"));
	QIcon icon;
	QString iconThemeName = QString::fromUtf8("back");
	if (QIcon::hasThemeIcon(iconThemeName))
		icon = QIcon::fromTheme(iconThemeName);
	else
		icon.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off);
	actionBack->setIcon(icon);
	actionForward->setObjectName(QString::fromUtf8("actionForward"));
	QIcon icon1;
	iconThemeName = QString::fromUtf8("forward");
	if (QIcon::hasThemeIcon(iconThemeName))
		icon1 = QIcon::fromTheme(iconThemeName);
	else
		icon1.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off);
	actionForward->setIcon(icon1);
	actionReload->setObjectName(QString::fromUtf8("actionReload"));
	QIcon icon2;
	iconThemeName = QString::fromUtf8("reload");
	if (QIcon::hasThemeIcon(iconThemeName))
		icon2 = QIcon::fromTheme(iconThemeName);
	else
		icon2.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off);
	actionReload->setIcon(icon2);
	actionConfigure->setObjectName(QString::fromUtf8("actionConfigure"));
	actionConfigure->setCheckable(true);
	QIcon icon3;
	iconThemeName = QString::fromUtf8("configure");
	if (QIcon::hasThemeIcon(iconThemeName))
		icon3 = QIcon::fromTheme(iconThemeName);
	else
		icon3.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off);
	actionConfigure->setIcon(icon3);
	lineUrl->setObjectName("lineUrl");
	toolBar->setObjectName(QString::fromUtf8("toolBar"));
	toolBar->addAction(actionBack);
	toolBar->addAction(actionForward);
	toolBar->addAction(actionReload);
	toolBar->addWidget(lineUrl);
	toolBar->addAction(actionConfigure);
	connect(lineUrl, SIGNAL(returnPressed()), this, SLOT(emit_urlChanged()));
}
